
import i18n from '@/lang'
import Vue from "vue";

// 表头
export const columns = [
  {
    title: i18n.t('partNumber'),
    key: 'partNumber',
    scopedSlots: { customRender: 'partNumber' },
    width: 160
  },
  {
    title: i18n.t('versionType'),
    dataIndex: 'versionType',
    width: 130,
    customRender: (text, record, index) => {
      return Vue.$store.getters.getDictCodeObj('versionTypeDictCode')[text] || text;
    },
  },
  {
      title: '车型',
      width: 160,
      key: 'modelCode',
      scopedSlots: { customRender: 'modelCode' }
  },
  {
    title: i18n.t('partName'),
    width: 160,
    key: 'partName',
    scopedSlots: { customRender: 'partName' }
  },
  {
    title: i18n.t('configurationFile'),
    width: 160,
    key: 'configurationFile',
    scopedSlots: { customRender: 'configurationFile' }
  },
  {
    title: i18n.t('configurationFileCode'),
    width: 160,
    key: 'configurationFileCode',
    scopedSlots: { customRender: 'configurationFileCode' }
  },
  {
    title: i18n.t('configFileVersion'),
    width: 160,
    key: 'configFileVersion',
    scopedSlots: { customRender: 'configFileVersion' }
  },
  {
    title: i18n.t('timeOfCreation'),
    dataIndex: 'createTime',
    width: 160,
    sorter: true,
    scopedSlots: { customRender: 'createTime' }
  },
  {
    title: i18n.t('creator'),
    width: 100,
    dataIndex: 'createBy'
  },
  {
    title: i18n.t('operation'),
    width: 190,
    fixed: 'right',
    scopedSlots: { customRender: 'action' }
  }
]
export const newEditconfigFilecolumns = [
  {
    title: i18n.t('fileName'),
    key: 'fileName',
    scopedSlots: { customRender: 'fileName' },
    width: 200
  },
  {
    slots: { title: 'fileStatus' },
    key: 'fileStatus',
    scopedSlots: { customRender: 'fileStatus' },
    width: 160
  },
  {
    title: i18n.t('zysf'),
    key: 'zysf',
    scopedSlots: { customRender: 'zysf' },
    width: 100
  },
  {
    title: i18n.t('zyz'),
    key: 'zyz',
    scopedSlots: { customRender: 'zyz' },
    width: 100
  },
  {
    title: i18n.t('estimatedInstallTime') + '(s)',
    dataIndex: 'installTime',
    scopedSlots: { customRender: 'installTime' },
    width: 120
  },
  {
    title: i18n.t('file') + i18n.t('sxType'),
    dataIndex: 'dllName',
    scopedSlots: { customRender: 'dllName' },
    width: 140
  },
  {
    title: i18n.t('versionType'),
    dataIndex: 'versionPhase',
    width: 100,
    customRender: (text, record, index) => {
      return Vue.$store.getters.getDictCodeObj('versionTypeDictCode')[text] || text;
    },
  },
  {
    title: i18n.t('softFormNo'),
    dataIndex: 'softFormNo',
    width: 150,
  },
]
